package day20171010;

class Student {


    //属性
    int age;
    String name;
    String gender;
    //行为

    void study() {
        System.out.println("student can study");
    }

    void run() {
        System.out.println("student can run");
    }


    Student huang = new Student();

    {
        huang.name = "huangrong";
        huang.age = 20;
        huang.gender = "女";
        huang.run();
        huang.study();
    }

}


public class EliteStudent extends Student {//继承的用法
    public static void main(String[] args) {
        EliteStudent M = new EliteStudent();
        {
            System.out.println(M.age);
        }

    }


}
